import org.junit.Assert;
import org.junit.Test;

public class Task {

    /* TODO */
    public void testGetMaxIndex() {

        try {
            int index1 = StringUtils.getMaxIndex(null);
            Assert.assertEquals("1断言错误，期望的结果与实际的结果不符！请修复代码bug", -1, index1);

            int index2 = StringUtils.getMaxIndex("admin");
            Assert.assertEquals("2断言错误，期望的结果与实际的结果不符！请修复代码bug", 4, index2);

        } catch (NullPointerException e) {
            Assert.fail("3出现空指针异常：" + e.getMessage());
        }

    }
}
